import 'package:flutter/material.dart';
import 'package:flutter_douban/config/app_colors.dart';
import 'package:flutter_douban/model/class_intros_model.dart';

class ClassIntroduceCell extends StatefulWidget {
  /// 详情基本信息
  final ClassIntrosModel model;

  const ClassIntroduceCell({Key? key, required this.model}) : super(key: key);

  @override
  _ClassIntroduceCellState createState() => _ClassIntroduceCellState();
}

class _ClassIntroduceCellState extends State<ClassIntroduceCell> {
  @override
  Widget build(BuildContext context) {
    return Container(
      alignment: Alignment.center,
      margin: EdgeInsets.only(left: 20, right: 20, top: 20, bottom: 0),
      child: Column(
        children: [
          Text(widget.model.title!,
              style: TextStyle(
                fontSize: 20,
                color: Colors.black,
                fontWeight: FontWeight.bold,
                decoration: TextDecoration.underline,
                decorationColor: AppColors.yellow,
              )),
          SizedBox(
            height: 10,
          ),
          Container(
            alignment: Alignment.centerLeft,
            child: Text(widget.model.content!,
                style: TextStyle(
                  fontSize: 16,
                  color: AppColors.black,
                  height: 1.7, //1倍行高
                )),
          )
        ],
      ),
    );
  }
}
